package io.xccit.controller;

import io.swagger.annotations.Api;
import io.xccit.pojo.param.ProductSearchParam;
import io.xccit.result.AjaxResult;
import io.xccit.service.ISearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author CH_ywx
 * @date 2023-09-13
 * @description 商品搜索接口
 */
@Api(tags = "商品搜索接口")
@RestController
@RequestMapping("/search")
public class SearchController {

    @Autowired
    private ISearchService searchService;

    @PostMapping("/product")
    public AjaxResult searchProduct(@RequestBody ProductSearchParam productSearchParam){
        return searchService.searchProduct(productSearchParam);
    }
}
